import { defineStore } from "pinia";
import { computed, ref } from "vue";

export const useStatusStore = defineStore(
  "status",
  () => {
    let swapOrderStatus = ref([
      { key: 0, name: "待接单", value: "pending", type: "warning" },
      { key: 1, name: "已完成", value: "complete", type: "success" },
      { key: 2, name: "进行中", value: "pending", type: "warning" },
      { key: 3, name: "已取消", value: "cancel", type: "danger" },
    ]);
    const pendingOrderStatus = ref([
      { key: 0, name: "进行中", type: "success" },
      { key: 1, name: "已暂停", type: "warning" },
      { key: 2, name: "已取消", type: "danger" },
    ]);
    return {
      swapOrderStatus,
      pendingOrderStatus,
    };
  },
  {
    persist: true,
  }
);
